package com.soft.javase.day06.datetime.student;

import java.time.LocalDate;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/24
 */
public class TestStudent {
    public static void main(String[] args) {
        Student[] students = new Student[4];

        students[0] = new Student("张三","001", LocalDate.of(2001,3,3));
        students[1] = new Student("李四","002", LocalDate.of(2001,4,20));
        students[2] = new Student("王五","003", LocalDate.of(2000,6,3));
        students[3] = new Student("赵六","004", LocalDate.of(2002,12,10));

        LocalDate birthDate = null;
        for (Student student : students) {
            if (student.getName().equals("张三")){
                 birthDate = student.getBirthDate();
                 break;
            }
        }

        for (Student student : students) {
            if (student.getBirthDate().isAfter(birthDate)){
                student.display();
            }
        }
    }
}
